home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / GAME / RoboWar 4.1.1.sit / RoboWar 4.1.1 / RoboWar 4.1.1.rsrc / TEXT_2005_Registers.txt < prev    next >
Text File  |  1995-04-29  |  15KB  |  146 lines

  1. V:  Registers
  2.  
  3. Each robot has a number of registers or variables.  They are initialized to their appropriate values, or 0 if none is appropriate, when the battle starts.  This section lists each variable, its use, and whether it can be read or written.  The registers are:
  4.  
  5. A-Z        AIM        BOTTOM     BULLET     CHANNEL
  6. CHRONON    COLLISION  DAMAGE     DOPPLER    ENERGY
  7. FIRE       FRIEND     HISTORY    HELLBORE   ID         
  8. KILLS      LEFT       LOOK       MINE       MISSILE    
  9. MOVEX         MOVEY      NUKE       PROBE      RADAR      
  10. RANDOM     RANGE         RIGHT      ROBOTS     SCAN       
  11. SHIELD     SIGNAL     SPEEDX     SPEEDY     STUNNER    
  12. TEAMMATES  TOP        WALL       X          Y
  13.  
  14. A-Z (except X and Y)
  15. User-defined variables.  They may be used for any temporary storage that the robot needs.  They may be read or written.
  16.  
  17. AIM
  18. Angle turret points.  May be read or written.  The angle is in degrees, oriented like a compass with 0 degrees pointing upward and 90 degrees pointing to the right.  All bullets and missiles are fired in the direction that the turret is pointing.
  19.  
  20. BULLET
  21. Fires a normal bullet if either normal or explosive bullets are enabled.  This is primarily useful so that robots equipped with explosive bullets can fire at short range without engulfing themselves in the explosion.  Returns 0 if read.
  22.  
  23. BOTTOM / BOT
  24. This register is used exclusively for interrupts.  It has no effect if written and returns 0 if read.
  25.  
  26. CHANNEL
  27. The robot窶冱 broadcasting and receiving channel.  May be read or written.  If it is read, it returns the current channel.  If it is written, it sets the channel.  The channel must be in a range of 1 to 10.  Communications over a given channel only affect robots on the same team.  Thus, a robot must be placed on a team with at least one other robot at Camp if communications are to have any effect.
  28.  
  29. CHRONON
  30. Returns the number of chronons elapsed in the current battle.  CHRONON may only be read.
  31.  
  32. COLLISION
  33. May only be read.  If another robot has collided with the current robot, the COLLISION variable returns 1; otherwise it returns 0.  When a collision with another robot takes place, both robots take one point of damage each chronon until they separate.  They may either separate by changing direction, or by blowing the rival to little pieces.
  34.  
  35. DAMAGE
  36. Robot窶冱 current damage rating.  May only be read.  When the battle begins, the damage rating starts at the maximum value set at the Hardware Store.  Damage caused by bullets, missiles, and TacNukes that is not absorbed by the robot窶冱 shields is removed from the damage rating.  When it reaches 0, the robot is dead.
  37.  
  38. DOPPLER
  39. This register is used to help tracking routines.  It is used in conjunction with the RANGE command.  If no target is in the robot's sights, (i.e. the RANGE register is 0), DOPPLER returns 0.  Otherwise, it returns the speed of the target in a direction perpendicular to the aim.  For instance, if the target is moving directly toward or away from the robot, DOPPLER will return 0.  If the robot's sights are pointing directly up and the target is moving from left to right at speed 8, the DOPPLER register will contain 8.  DOPPLER has no effect if written.  (Note:  the DOPPLER command existed in some earlier versions of RoboWar, but was somewhat buggy and had not been documented.)
  40.  
  41. ENERGY
  42. Robot窶冱 current energy.  May be read, but not written.  ENERGY returns the amount of energy the robot currently has.  If not used for other purposes, energy is restored at 2 points per chronon.  However, if the energy ever drops below 0, the robot does not interpret any more instructions or perform any more actions until the energy exceeds 0 again.   When the battle begins energy is set to the maximum energy value specified in the Hardware Store.
  43.  
  44. FIRE
  45. Used to shoot bullets.  Returns 0 if read, shoots bullet with energy investment equal to amount written.  This energy investment is removed from the robot窶冱 energy supply.  It may exceed the robot窶冱 current energy value (placing the robot at negative energy and immobilizing it), but may not exceed the robots energy maximum.  Depending on the settings from the Hardware Store, bullets may be normal, rubber, or explosive.  Explosive bullets explode like TacNukes in a 36 pixel radius when they hit their target.  Whey they detonate (3 chronons after impact) they do damage of 1.5*energy investment to all robots in the blast radius.  This is a larger, faster explosion than in versions of RoboWar before 3.0.  Normal bullets do damage equal to the energy investment when they hit their targets.  Rubber bullets only do half damage if they hit.  Bullets move across the screen at a speed of 12 pixels per chronon, heading in the direction that the robot窶冱 turret pointed when the shot was fired.
  46.  
  47. FRIEND
  48. Is the robot sensed in a collision on your team?  FRIEND can only be read.  If the collision register holds a 1, the FRIEND register holds a 1 if the robot collided with is on the same team.  Otherwise, the FRIEND register holds a 0.  This is useful to determine if a collision has taken place with another robot on your same team.
  49.  
  50. HISTORY
  51. Maintains a history of results and observations between battles.  Each robot has 50 history registers.  The history register to read or write is selected with the setparam command (e.g. 2 HISTORY' SETPARAM).  The history registers are:
  52.     1)  Number of battles fought
  53.     2)  Kills made in previous battle
  54.     3)  Kills made in all battles
  55.     4)  Survival points in previous battle
  56.     5)  Survival points from all battles
  57.     6)  1 if last battle timed out
  58.     7)  Teammates alive at end of last battle (excluding self)
  59.     8)  Teammates alive at end of all battle
  60.     9)  Damage at end of last battle (0 if dead)
  61.     10)  Chronons elapsed at end of last battle
  62.     11)  Chronons elapsed in all previous battles
  63.     12-30)  Reserved for future RoboWar versions
  64.     31-50)  User-defined.
  65. When no battles have been fought yet, numbers default to zero.  User-defined history registers may be read or written and are preserved between rounds so robots can learn from the results of previous rounds.  All other history registers may only be read.  Suggestions for new history registers are welcome.  History is zeroed anytime robots are added or deleted in the arena (or between rounds in tournaments).  It may also be erased or viewed with the history commands under the Arena menu.
  66.  
  67. HELLBORE
  68. Used to launch hellbores.  Returns 0 if read, shoots hellbore with speed equal to amount written (this is different than hellbores in RoboWar 2.1.2).  This amount is removed from the robot's energy supply.  Hellbores reduce the shield of any robot they hit to zero but do no other damage.  They must move at a speed from 4 to 20 in the direction that the robot's turret pointed when the shot was fired.  Hellbores cannot be used unless they were first enabled at the hardware store.
  69.  
  70. ID
  71. Robot's unique ID number.  Each robot in the Arena has an ID from 0-5; it can be used to tell robots apart.
  72.  
  73. KILLS
  74. The number of kills the robot has made in this battle.  A robot gets no credit for killing itself or for crushing other robots during a collision.
  75.  
  76. LEFT
  77. This register is used exclusively for interrupts.  It has no effect if written and returns 0 if read.
  78.  
  79. LOOK
  80. Targeting offset from AIM.  The RANGE command returns a distance LOOK degrees clockwise to the AIM register.  However, all shots still come from the AIM direction.  Thus, a robot can actually look for targets that are ahead of the current AIM value.  If not otherwise set, LOOK defaults to 0.  LOOK may be read or written.
  81.  
  82. MINE
  83. Used to lay atomic land mines.  Returns 0 if read, places a mine with energy investment equal to the amount written.  The mine is stationary and becomes active 5 chronons after placement.  Once active, it will detonate against any target that hits it, causing damage equal to 2*(energy investment-5).  This is twice as effective as mines in RoboWar 2.3 and earlier.  Mines cannot be used unless they were first enabled at the hardware store.
  84.  
  85. MISSILE
  86. Used to shoot missiles.  Returns 0 if read, shoots missile with energy investment equal to amount written.  This energy investment is removed from the robot窶冱 energy supply.  It may not exceed 50; if it does, only 50 energy is used.  Missiles do 2*energy investment in damage if they hit their targets.  Missiles move across the screen at a speed of 5 pixels per chronon, heading in the direction that the robot窶冱 turret pointed when the shot was fired.  Missiles cannot be used unless they were first enabled at the hardware store.
  87.  
  88. MOVEX
  89. Used to move the robot a given distance in the X direction without changing SPEEDX.  Returns 0 if read, moves the robot the specified distance if written.  Movement costs two points of energy per unit moved.  The distance must be between -20 and 20 units.
  90.  
  91. MOVEY
  92. Used to move the robot a given distance in the Y direction without changing SPEEDY.  MOVEY has the same characteristics and restrictions as MOVEX.
  93.  
  94. NUKE
  95. Used to place TacNukes, or Tactical Nuclear Devices.  Returns 0 if read, places TacNuke with energy investment equal to amount written.  This energy investment is removed form the robot窶冱 energy supply.  It may exceed the robot窶冱 current energy value (placing the robot at negative energy and immobilizing it), but may not exceed the robots energy maximum.  TacNukes begin to explode as soon as they are placed, increasing in radius by 5 pixels each chronon.  At the tenth chronon, when they have a radius of 50, they detonate and cause 1.5*energy investment in damage to all robots in the radius.  Robots who lay TacNukes are well advised to hasten away and be out of the blast radius when the devices explode.  TacNukes cannot be used unless they were first enabled at the hardware store.
  96.  
  97. PROBE
  98. Long range probe of opponent's systems.  Returns information about the target in the direction of the AIM register when read; no effect if written.  The register to probe is chosen with the SETPARAM command (e.g. SHIELD' PROBE' SETPARAM to select the SHIELD register for probing); it may be one of DAMAGE, ENERGY, SHIELD, ID, TEAMMATES, AIM, LOOK, SCAN.  Probes must be enabled in the hardware store at the cost of one hardware point.  PROBE defaults to probing the DAMAGE register if no other parameter has been set.
  99.  
  100. RADAR
  101. Range to nearest bullet, missile, or TacNuke in the path of AIM.  May only be read.  RADAR checks a path 40 degrees wide centered on the AIM.  It returns the distance to the nearest bullet, missile, or TacNuke in this path.  If there are none, it returns 0.  Note that the weapon detected might be moving perpendicular to the aim, not toward the robot.
  102.  
  103. RANDOM
  104. A random number from 0 to 359.  May only be read.
  105.  
  106. RANGE
  107. Range to nearest target in sights.  May only be read.  If there is a target in the direction the robot窶冱 AIM points, RANGE returns the distance.  Otherwise, it returns 0.
  108.  
  109. RIGHT
  110. This register is used exclusively for interrupts.  It has no effect if written and returns 0 if read.
  111.  
  112. ROBOTS
  113. Number of robots alive.  Returns the number of robots alive in the arena, including the robot itself.
  114.  
  115. SCAN
  116. Similar to LOOK, the radar offset from the AIM.  The RADAR command returns a distance SCAN degrees clockwise from the AIM register.  Thus, a robot can look for oncoming attacks coming from a different direction than the turret is pointing.  If not otherwise set, SCAN defaults to 0.  SCAN may be read or written.
  117.  
  118. SHIELD
  119. Robot窶冱 current shield level.  May be read or written.  If read, it returns the current level of the shield, or 0 if no shields are up.  If written, is sets the shield level to the value written.  If the current level is less than the level written, a point of energy is used for each point added to the shields.  If not enough energy is available to set the shields, the shields are only strengthened as far as remaining energy permits. If the current level is greater than the level written, a point of energy is regained for each point of difference, although energy cannot exceed the maximum energy value set in the Hardware Store.  Shields can absorb damage from bullets, missiles, or TacNukes that otherwise would have been deducted from a robot窶冱 damage score.  Each point of damage that is done deducts one point from the shield level, until no power is left in the shields.  The remaining damage is then done to a robot窶冱 damage score.  Even if shields are not hit, they decrease by one half point each chronon from natural energy decay.  Note that this replaces the old drain of one point per chronon in previous versions of RoboWar.  Shields may be charged above the maximum shield value set in the Hardware Store (although they may never exceed 150), but if they are above maximum, they decrease by two points instead of one half per chronon.  Shields are set to 0 when the battle begins.
  120.  
  121. SIGNAL
  122. The signal value on the robot窶冱 current channel.  May be read or written.  If it is read, it returns the last value broadcast over the channel by any robot on the same team.  If it is written, the value written is broadcast over the channel and may be read any time in the future by any other robot on the same team.  Typically signals and channels are used by two or more robots to coordinate movement or team up against another set of robots.
  123.  
  124. SPEEDX
  125. Speed of robot in left-right direction.  May be read or written.  Positive speeds move right, while negative speeds move to the left of the screen.  If SPEEDX is read, it returns the current velocity; if it is written, it sets the velocity.  Speeds must be in the range of -20 to 20.  Each point of change in speed costs 2 points of energy; thus going from 10 to -2 costs 24 energy.
  126.  
  127. SPEEDY
  128. Speed of robot in up-down direction.  May be read or written.  Positive values move down, while negative values move up.  SPEEDY has the same limits and characteristics as SPEEDX.
  129.  
  130. STUNNER
  131. Used to fire a stasis capsule.  Returns 0 if read, shoots stasis capsule with speed 14 in the directon that the robot's turret points.  The amound written is removed from the robot's energy supply; if a stasis capsule hits a robot, the robot is placed in stasis for one chronon for every four points of energy invested in the capsule.  While in stasis, a robot does not move, interpret instructions, or regain energy; however, the robot's shields do not decay.  Stunners cannot be used unless they are first enabled in the Hardware Store.
  132.  
  133. TEAMMATES
  134. Number of living teammates, not including self.  May only be read.
  135.  
  136. TOP
  137. This register is used exclusively for interrupts.  It has no effect if written and returns 0 if read.
  138.  
  139. WALL
  140. Is the robot touching the electrified walls?  Returns 1 when read if the robot is touching the wall, or 0 otherwise.  No effect if written.
  141.  
  142. X
  143. X position of robot.  May range from 0 to 300 (the boundaries of the board).  0 is the left side; 300 is the right.  X may be read but may not be written (no unrestricted teleporting!).
  144.  
  145. Y
  146. Y position of robot.  May range from 0 to 300.  0 is the top; 300 is the bottom.  Y may be read but not written.